Login-Logout

Description

The Login-Logout defined control adds a Login button and Logout button to the UX component and a placeholder control to display login errors. These buttons can only be used if the UX component's Has integrated login functionality is enabled.

Discussion

The buttons use the UX component's login() and logout() JavaScript methods to perform the login and log out actions.

Login

{dialog.object}.login();

Logout

{dialog.object}.logout();
You can select the 'Login-Logout' item in the 'Defined Controls section of the toolbox to automatically add login/logout buttons and also the placeholder for login errors.
images/uxlogin5.jpg

Server-Side Events

When the user clicks the 'login' button to login, an Ajax callback is made to authenticate the user. There are several server-side events for login and logout: beforeLogin, onLogin, and onLogout. These are accessible in the Server-Side Events page in the UX Component Builder.

Client-Side Events

When the user logs in or logs out there are several client-side events that fire, as shown in the image below.

images/ux_login3.jpg